<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

$this->load->helper('html');
?>



<!-- JavaScript -->
<script type="text/javascript" src="<?= base_url() ?>js/wufoo.js"></script>

<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />


<div id="container">
    <fieldset class="fieldset">
        <legend class="legend">

		| Form Data Keping |</legend>

        <div id="contentform" style="border:solid thin #BBBBBB; height:350px; background-color:#F9F9F9; -moz-border-radius: 5px;  padding-top:10px; padding-bottom:0.3px; margin-right:100px; margin-left:100px;">

            <!-- Start value -->
            <?
            //Setting Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
            $value = array(
                'id_keping' => "",
                'keping' => "",
                'nilai_iri' => "",
                'posisi_km' => "",
                'tipe' => "",
                'lebar' => "",
                'no_ruas' => "",
                'act_form' => "keping/add"
            );

            //Setting Value pada form Jika melakukan prosedur Edit terhadap data tertentu.
            if ($status == "edit") {
                $value['id_keping'] = $id_keping;
                $value['keping'] = $keping;
                $value['nilai_iri'] = $nilai_iri;
                $value['posisi_km'] = $posisi_km;
                $value['tipe'] = $tipe;
                $value['lebar'] = $lebar;
                $value['no_ruas'] = $no_ruas;
                $value['act_form'] = "keping/update/" . $value['id_keping'];
            }//end if
            ?>
            <?= form_open_multipart($value["act_form"]); ?>
            <!-- End value -->

            <table width="847" border="0" bordercolor="#F0F0F0">
                <tr>
                    <td width="905" height="150">
                        <form id="form1" name="form1" method="post">
                            <div align="center">
                                <table width="850" border="0">
                                    <tr>
                                        <td width="80">Keping</td>
                                        <td width="208"><input name="keping" type="text" size="50" value="<?= $value['keping'] ?>"/></td>
                                        <td><? echo form_error('keping');?></td>
                                    </tr>
									<tr>
                                        <td width="80">Nilai IRI</td>
										<td width="208"><input name="nilai_iri" type="text" size="50" value="<?= $value['nilai_iri'] ?>"/></td>
                                        <td><? echo form_error('nilai_iri');?></td>
                                    </tr>
									<tr>
                                        <td width="80">Posisi Km</td>
										<td width="208"><input name="posisi_km" type="text" size="50" value="<?= $value['posisi_km'] ?>"/></td>
                                        <td><? echo form_error('posisi_km');?></td>
                                    </tr>
									<tr>
                                        <td width="80">Tipe</td>
                                        <td>
										<?
											$options['A'] = "A (ASPAL)";
											$options['P'] = "P (PENMAC)";
											$options['T'] = "T (TANAH)";
											echo form_dropdown('tipe', $options, $value["tipe"], 'class="field select"');
										?>
										</td>
                                        <td><? echo form_error('tipe');?></td>
                                    </tr>
									<tr>
                                        <td width="80">Lebar Jalan</td>
										<td width="208"><input name="lebar" type="text" size="50" value="<?= $value['lebar'] ?>"/></td>
                                        <td><? echo form_error('lebar');?></td>
                                    </tr>
                                    <tr>
                                        <td height="28">&nbsp;</td>
                                        <td>
                                            <div align="left">
                                                <input type="submit" name="Submit" value="Simpan" />
												<a href="<?php echo site_url('keping/index/'.$this->session->userdata('no_ruas').'') ?>">
												<input type="button" value="Kembali" />
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </form>        
                        <p align="center">&nbsp;</p></td></tr>
            </table>
        </div>
        <p>&nbsp;</p>
    </fieldset>
</div> 
<p>
    <!--container-->
</p>
<p>&nbsp; </p>
